package com.dayatang.hrm.compensation.policy;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;

/**
 * 直接取值策略
 * 
 * @author chencao
 * 
 */
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorValue("2")
public class DirectlyCalculatePolicy extends DataCalculatePolicy {

	/**
	 * 
	 */
	private static final long serialVersionUID = -300107805054723582L;

	private static DirectlyCalculatePolicy INSTANCE;

	private DirectlyCalculatePolicy() {
	}

	public static DirectlyCalculatePolicy getInstance() {
		if (INSTANCE == null) {
			INSTANCE = getDataCalculatePolicyRepository().findAllPolicy(
					DirectlyCalculatePolicy.class).get(0);
		}
		return INSTANCE;
	}

}
